<script setup>
import { ref } from 'vue';
function f1(event) {
    let flag = confirm('你确定要跳转吗？');
    if (!flag) {
        event.preventDefault();
    }
}
const count = ref(0);;
function f2() {
    count.value++;
}
</script>


<template>
    <h1>{{ count }}</h1>
    <a href="https://www.atguigu.com" v-on:click="f1($event)">123123123</a>


    <button @click.once="f2()">12312312</button>
</template>